* s~\t+$~~
[lhc/web/wiklou.git] / includes / ImageGallery.php
index c33a3f2..a65b40d 100644 (file)
@@ -1,17 +1,14 @@
 <?php
-/**
- * @package MediaWiki
- */
+if ( ! defined( 'MEDIAWIKI' ) )
+       die();
 
 /**
- * This is not a valid entry point, perform no further processing unless MEDIAWIKI is defined
+ * @package MediaWiki
  */
-if( defined( 'MEDIAWIKI' ) ) {
-
 
 /**
  * Image gallery
- * 
+ *
  * Add images to the gallery using add(), then render that list to HTML using toHTML().
  *
  * @package MediaWiki
@@ -20,7 +17,7 @@ class ImageGallery
 {
        var $mImages, $mShowBytes, $mShowFilename;
 
-       /** 
+       /**
         * Create a new image gallery object.
         */
        function ImageGallery( ) {
@@ -60,7 +57,7 @@ class ImageGallery
        /**
         * Enable/Disable showing of the file size of an image in the gallery.
         * Enabled by default.
-        * 
+        *
         * @param boolean $f    set to false to disable
         */
        function setShowBytes( $f ) {
@@ -70,7 +67,7 @@ class ImageGallery
        /**
         * Enable/Disable showing of the filename of an image in the gallery.
         * Enabled by default.
-        * 
+        *
         * @param boolean $f    set to false to disable
         */
        function setShowFilename( $f ) {
@@ -79,7 +76,7 @@ class ImageGallery
 
        /**
         * Return a HTML representation of the image gallery
-        * 
+        *
         * For each image in the gallery, display
         * - a thumbnail
         * - the image name
@@ -123,7 +120,7 @@ class ImageGallery
                        } else {
                                $nb = '';
                        }
-                               
+
                        $textlink = $this->mShowFilename ?
                                $sk->makeKnownLinkObj( $nt, htmlspecialchars( $wgLang->truncate( $nt->getText(), 20, '...' ) ) ) . "<br />\n" :
                                '' ;
@@ -132,7 +129,7 @@ class ImageGallery
                        $thumb = $img->getThumbnail( 120, 120 );
                        $vpad = floor( ( 150 - $thumb->height ) /2 ) - 2;
                        $s .= '<td><div class="gallerybox">' . '<div class="thumb" style="padding: ' . $vpad . 'px 0;">';
-                       
+
                        # ATTENTION: The newline after <div class="gallerytext"> is needed to accommodate htmltidy which
                        # in version 4.8.6 generated crackpot html in its absence, see:
                        # http://bugzilla.wikimedia.org/show_bug.cgi?id=1765 -Ævar
@@ -152,9 +149,4 @@ class ImageGallery
        }
 
 } //class
-
-
-
-
-} // defined( 'MEDIAWIKI' )
 ?>